package br.com.mobprovas.dao;

import java.io.Serializable;
import java.util.List;
import java.util.Map;

import org.hibernate.criterion.Criterion;

public interface GenericDAO<T, ID extends Serializable> {

    T update(T entity);
	void delete(T entity);
	List<T> listByCriteria(Criterion... criterion);
	T findByCriteria(Criterion... criterion);
	List<T> listByHQL(String hql, Map<String, Object> params);
	T findByHQL(String hql, Map<String, Object> params);
	List<T> listAll(T entity);
	T findById(int id);
	T save(T entity);
	
	
}
